<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>title</title>
</head>
<body>
<div id="app">
    <button @click="changeTarget">点击改变超链接地址</button>
    <br/>
    <a v-bind:href="target">点击跳转</a>
</div>

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    const app=new Vue({
        el:"#app",
        data:{
            target:"http://www.baidu.com/"
        },
        methods:{ //用来定义事件
            changeTarget() {
                this.target="http://www.w3school.com.cn/"
            }
        }
    });
</script>
</body>
</html>